package com.bobi.tfca.ui.mainnavigation

import android.os.Bundle
import androidx.navigation.fragment.NavHostFragment
import androidx.navigation.ui.setupWithNavController
import com.bobi.tfca.R
import com.bobi.tfca.base.BaseFragment
import com.bobi.tfca.databinding.FragmentMainNavigationBinding
import com.bobi.tfca.ui.login.LoginFragmentViewModel

/**
 *  主要的导航页面
 */
class MainNavigationFragment : BaseFragment<FragmentMainNavigationBinding, LoginFragmentViewModel>(
    FragmentMainNavigationBinding::inflate,
    null
) {
    override fun initFragment(
        binding: FragmentMainNavigationBinding,
        viewModel: LoginFragmentViewModel?,
        savedInstanceState: Bundle?
    ) {
        (childFragmentManager.findFragmentById(R.id.main_view_nav) as NavHostFragment).apply {
            binding.bottomNav.setupWithNavController(this.navController)
        }
    }
}